﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/MasterPage.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<FrasesSimpsonsMvc.Models.Capitulos>>" %>

<asp:Content ID="Head" ContentPlaceHolderID="HeadContent" runat="server">
	<% Html.RenderPartial("BasicHeadUserControl"); %>
</asp:Content>

<asp:Content ID="Title" ContentPlaceHolderID="TitleContent" runat="server">Capítulos</asp:Content>

<asp:Content ID="Main" ContentPlaceHolderID="MainContent" runat="server">
	<% Html.RenderPartial("SearchCleanUserControl"); %>

	<div class="row-responsive">
		<ul class="breadcrumb">
			<li>
				<a href="<%= Url.Action("Index", "Home") %>">Home</a> <span class="divider">/</span>
			</li>
			<li class="active">Capítulos</li>
		</ul>
	</div>

	<div class="row-responsive">
		<h2>Capítulos</h2>

		<% foreach (var temporadasPorCapitulo in Model.GroupBy(x => x.Temporadas)) { %>
			<span class="label label-success tall"><a class="label-link" href="<%= Url.Action("Detail", "Temporada", new { Id = temporadasPorCapitulo.Key.Id })%>">Temporada <%= temporadasPorCapitulo.Key.Numero %></a></span>
			<ol>
			<% foreach (var capitulo in temporadasPorCapitulo) { %>
				<li><span class="label label-inverse tall"><a class="label-link" href="<%= Url.Action("Detail", "Capitulo", new { Id = capitulo.Id })%>"><%= capitulo.Nombre %></a></span></li>
			<% } %>
			</ol>
		<% } %>
	</div>

	
</asp:Content>